package com.orkcto.springcloud.controller;

import com.orkcto.springcloud.model.User;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HellowController {

    @RequestMapping("service/hello")
    public String hello(){

        int i = 10/0;
        System.err.println("调用服务提供者2");
        return "调用服务提供者2" +"hello springcloud";
    }

    @RequestMapping("service/user")
    public User user(){
        System.err.println("调用服务提供者2");
        User user = new User();
        user.setId(108);
        user.setName("张三丰");
        user.setPhone("13840000000");

        return user;
    }
}
